package servers;

import java.rmi.*;
import java.util.List;

import fanzone.EventInfo;
import fanzone.ResourceInfo;

public interface IServer extends Remote{
	
	public boolean ping () throws RemoteException;
	
	public void setPrimary () throws RemoteException;
	
	public byte[] getServerData () throws RemoteException;
	
	public boolean addCommunity (String communityName, String pwd) throws RemoteException;
	
	public boolean joinCommunity(String communityName) throws RemoteException;
	
	public boolean unJoinCommunity(String communityName) throws RemoteException;
	
	public List<String> listCommunities() throws RemoteException;
	
	public boolean addEvent (EventInfo event) throws RemoteException;
	
	public List<EventInfo> listEvents(String communityName) throws RemoteException;
	
	public List<EventInfo> searchEvents(String communityName, String query) throws RemoteException;
	
	public boolean addResource(String communityName, String eventID,
			ResourceInfo resource) throws RemoteException;
	
	public boolean addResourceProvider(String resourceID)
			throws RemoteException;
}
